const mongoose = require("mongoose");

const ArticleSchema = mongoose.Schema(
  {
    title: String,
    content: String,
    user_id: {
      type: mongoose.SchemaTypes.ObjectId, // 存储的是user的id  外键
      //   ref: "User",
    },
  },
  {
    timestamps: true,
  }
);
const ArticleModel = mongoose.model("Article", ArticleSchema);
module.exports = ArticleModel;
